LE
pedido

!mana E !vida Somente Para Player Vip.

Por Legendios2, 28 de ago. de 2012 em Scripts

creio ser super fácil ;x
8
1.1k
Legendios2L
28 de agosto de 2012 às 12:16

!mana e !vida Somente para player VIP, e quando o player fazer o comando outros verem, deve ser no ghostacess.

 

 

Fácil porém não consegui, alguém me salva?

 

 

 

8.60

Storage VIP 13540

 

 

!Vida

 

function onSay(cid, words, param, channel)

if(param == '') then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nVida atual: " .. getCreatureHealth(cid) .. "\nVida máxima: " .. getCreatureMaxHealth(cid) .. "")

return true

end

if isPremium(cid) == TRUE then

local pid = getPlayerByNameWildcard(param)

if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O jogador com o nome " .. param .. " não esta online ou não existe.")

return true

end

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nVida de [ " .. getCreatureName(pid) .. " ] atual: " .. getCreatureHealth(pid) .. "\nVida de [ " .. getCreatureName(pid) .. " ] máxima: " .. getCreatureMaxHealth(pid) .. "")

return true

else

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Apenas jogadores VIP podem utilizar este comando para visualizar informações de outros jogadores.")

return true

end

end

 

 

 

 

 

!Mana

 

function onSay(cid, words, param, channel)

if(param == '') then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nMana atual: " .. getCreatureMana(cid) .. "\nMana máxima: " .. getCreatureMaxMana(cid) .. "")

return true

end

if isPremium(cid) == TRUE then

local pid = getPlayerByNameWildcard(param)

if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O jogador com o nome " .. param .. " não esta online ou não existe.")

return true

end

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nMana de [ " .. getCreatureName(pid) .. " ] atual: " .. getCreatureMana(pid) .. "\nMana de [ " .. getCreatureName(pid) .. " ] máxima: " .. getCreatureMaxMana(pid) .. "")

return true

else

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Apenas jogadores VIP podem utilizar este comando para visualizar informações de outros jogadores.")

return true

end

end

Editado Agosto 28 por Legendios2

VodkartV
28 de agosto de 2012 às 12:20

onde tiver essa linha:

 

if isPremium(cid) == TRUE then

 

troque por essa:

 

if getPlayerStorageValue(cid, 13540) - os.time() > 0 then 

Legendios2L
28 de agosto de 2012 às 12:43

Teria como todos veem quando eu fizer o comando?

VodkartV
28 de agosto de 2012 às 12:50

Todos quem? o server inteiro?

Legendios2L
28 de agosto de 2012 às 13:09

Não.

 

Assim, quando eu digitar o comando !vida Fulano de tal, e aparecer no defalt, assim como ele estivesse falando normalmente para todos verem.

 

 

Obrigadão desde já.

LuckOakeL
28 de agosto de 2012 às 13:31

Nessa parte:

 

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Apenas jogadores VIP podem utilizar este comando para visualizar informações de outros jogadores.")
return true
end
end

 

Retire o return true ou coloque return false.

Editado Agosto 28 por LuckOake

Legendios2L
28 de agosto de 2012 às 15:22

Ótimo, Obrigado

LuckOake e Vodkart

 

 

icon1.gif

MatheusEnjoyM
28 de agosto de 2012 às 15:38

Duvida sanada, topico movido. :p